﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace My.Core.Extensions
{
	public static class StringExtensions
	{
		public static bool IsEmpty(this object value)
		{
			if (value != null && !string.IsNullOrEmpty(value.ToString()))
			{
				return false;
			}
			else
			{
				return true;
			}
		}
		public static bool IsNotEmpty(this object value)
		{
			return !IsEmpty(value);
		}
		public static bool IsNullOrZero(this object value)
		{
			if (value == null || value.ToString().Trim() == "0")
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
}
